package com.qf.shopping.dao.impl;

import com.qf.shopping.dao.IOrderDetailDao;
import com.qf.shopping.entity.OrderDetail;
import com.qf.shopping.utils.Tools;

import java.util.List;

/**商品数据详情
 * @author 三旬
 * @version 1.0  2022/9/24
 */

public class OrderDetailDaoImpl implements IOrderDetailDao {

    @Override
    public Integer insert(OrderDetail o) {
        String sql = "insert into t_order_detail() values(default,?,?,?,?,?,?,?,?)";
        return Tools.update(sql,o.getOid(),o.getPid(),o.getPname(),o.getDes(),o.getPngUrl(),o.getPrice(),o.getNums(),o.getTotal());
    }

    @Override
    public Integer deleteById(Integer id) {
        return null;
    }

    @Override
    public Integer updateById(OrderDetail orderDetail) {
        return null;
    }

    @Override
    public OrderDetail selectOneById(Integer id) {
        return null;
    }

    @Override
    public List<OrderDetail> selectAll() {
        String sql = "select * from t_order_detail ";
        return Tools.selectList(sql,OrderDetail.class);
    }

    @Override
    public List<OrderDetail> selectPage(Integer index, Integer size) {
        return null;
    }

    @Override
    public Integer counts() {
        return null;
    }
}
